<?php

namespace App\Exceptions;

class UserException extends BaseException
{
    protected int $baseCode = self::BASE_CODE_OF_USER;

    const CODE_1000 = 1000;
    const CODE_1001 = 1001;
    const CODE_1002 = 1002;
    const CODE_1003 = 1003;
    const CODE_1004 = 1004;
    const CODE_1005 = 1005;

    protected array $showMsg = [
        self::CODE_1000 => '用户已存在',
        self::CODE_1001 => '密码不一致',
        self::CODE_1002 => '邀请人不存在',
        self::CODE_1003 => '用户不存在',
        self::CODE_1004 => '用户地址不存在',
        self::CODE_1005 => '用户名密码错误'
    ];

    function __construct($msg = '', $code = 0)
    {
        parent::__construct($msg, $code);
    }
}
